﻿<phone:PhoneApplicationPage 
    x:Class="QuickTasks.Views.Places.Address"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
     xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"  
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="576*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Orientation="Horizontal"  Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <ScrollViewer Height="Auto" Grid.Row="1" Margin="12,0,12,0">
            <Grid x:Name="ContentPanel">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0">
                    <TextBlock Text="Name"  FontSize="28"  Margin="20,0,0,0"/>
                    <TextBlock Text="Required" FontSize="28" Foreground="Red"  Margin="150,0,0,0" x:Name="tblkMobileValidation" Visibility="Collapsed"/>
                </StackPanel>
                <TextBox x:Name="TbxName" InputScope="Text"  Grid.Row="1" TextChanged="TbxName_TextChanged" />
                <StackPanel Orientation="Horizontal"  Grid.Row="2">
                    <TextBlock Text="Address" FontSize="28"   Margin="20,0,0,0"/>
                    <TextBlock Text="Required" FontSize="28" Foreground="Red"  Margin="150,0,0,0" x:Name="tblkMobileValidation1" Visibility="Collapsed"/>
                    <TextBlock Text="Not a Valid Address" FontSize="28" Foreground="Red"  Margin="100,0,0,0" x:Name="tblkAddressValidation" Visibility="Collapsed"/>
                </StackPanel>
                <TextBox x:Name="TbxAddress" InputScope="Text" Grid.Row="3"  GotFocus="TbxAddress_GotFocus"/>
                <StackPanel Orientation="Horizontal" Grid.Row="4">
                <TextBlock Text="City" Grid.Row="4"  FontSize="28"  Margin="20,0,0,0"/>
                <TextBlock Text="Not a Valid Address" FontSize="28" Foreground="Red"  Margin="100,0,0,0" x:Name="tblkcityValidation" Visibility="Collapsed"/>
                </StackPanel>
                <TextBox x:Name="TbxCity" InputScope="Text"  Grid.Row="5"/>
                <StackPanel Grid.Row="6" Orientation="Horizontal">
                <TextBlock Text="State"   FontSize="28"  Margin="20,0,0,0"/>
                 <TextBlock Text="Zip code"   FontSize="28"  Margin="160,0,0,0"/>
                 </StackPanel>
                <StackPanel Grid.Row="7" Orientation="Horizontal">
                    <TextBox x:Name="TbxState" Width="230"  InputScope="Text" />
                    <TextBox x:Name="TbxZipcode" Width="230"  InputScope="PostalCode"/>
                </StackPanel>
               
                <TextBlock Text="Country" Grid.Row="8"  FontSize="28"  Margin="20,0,0,0"/>
                <TextBox x:Name="TbxCountry" InputScope="Text"  Grid.Row="9"/>
            </Grid>
        </ScrollViewer>
        <StackPanel Name="adstackpanel" Grid.Row="2" VerticalAlignment="Bottom" Margin="-15,32,0,0"></StackPanel>
      

    </Grid>
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="save" Click="ApplicationBarSaveAddListButton_Click"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="acquire location using GPS " Click="ApplicationBarMenuItem_Click"/>
               
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
        
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
